import request from './ajax'

// 获取分类列表
export const getCategoriesList = (queryinfo) => {
  return request({
    url: '/private/v1/categories',
    method: 'get',
    params: queryinfo
  })
}

// 获取商品分类树
export const addCategories = (queryinfo) => {
  return request({
    url: '/private/v1/categories',
    method: 'post',
    data: queryinfo
  })
}

// 删除分类
export const deleteCategory = (categoryId) => {
  return request({
    method: 'DELETE',
    url: `/private/v1/categories/${categoryId}`
  })
}
